package com.huowenjie.dao;

import com.huowenjie.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;



public interface TestQueryDao extends JpaRepository<User,Integer> {

    @Query(value = "select * from m_user",nativeQuery = true)
    public Page<User> getUser(Pageable pageable);

//    @Query(value = "select u.*,d.dname from m_user u left join m_dept d on d.dids=u.depid",nativeQuery = true)
//    public Page<User> getUser1(Pageable pageable);   ???

}
